<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>

<bean:define id="role" value="${auth.role.roleType}" scope="session" />
<logic:equal name="role" value="dispatcher">
<html:form action="/employeesAction">
	<h1>
		<bean:message key="employees" />
	</h1>
	<table>
		<c:forEach var="emp" items="${employees}">

			<tr>
				<th><html:radio property="employeeId" value="${emp.id}" /></th>
				<th>${emp.name}</th>
				<th>${emp.surname}</th>
				<th>${emp.speciality.specialityName}</th>
			</tr>

		</c:forEach>
	</table>
<html:errors property="chooseEmployee" />
	<html:submit property="method">
		<bean:message key="employee.add" />
	</html:submit>
	<html:submit property="method">
		<bean:message key="employee.update" />
	</html:submit>
	<html:submit property="method">
		<bean:message key="employee.delete" />
	</html:submit>

</html:form>
</logic:equal>